package com.hitqz.robot.dispatch.netty.service;

import com.google.common.cache.Cache;
import com.hitqz.robot.api.business.entity.RobotEntity;
import com.hitqz.robot.api.common.dto.info.ReleaseResourceDto;
import com.hitqz.robot.api.common.dto.info.RobotNavInfoDto;
import com.hitqz.robot.api.dispatch.protocol.dto.RobotApplyGotoTargetDto;

import java.util.List;

/**
 * @author xupkun
 * @date 2024/7/28
 */
public interface DispatchService {

    /**
     * 查询最优秀的AGV/机器人
     * @return
     */
    String findExecuteRobot(Integer groupId, String taskContent);

    /**
     * 呼叫算法
     * @param algorithm
     * @param robotEntityList
     */
    void calAlgorithm(String algorithm, Integer groupId, List<RobotEntity> robotEntityList);


    void handle(RobotNavInfoDto dto);

    void releaseResource(ReleaseResourceDto dto);

    void releaseResourceExcludeSelf(ReleaseResourceDto dto);

    List<RobotNavInfoDto> getRobotNavInfoDtoList();

    void applyGotoTarget(RobotApplyGotoTargetDto dto);

    void cancelGotoTarget(ReleaseResourceDto dto);
}
